package com.yolo.common.asyn;

import com.yolo.entity.OperLog;
import com.yolo.service.OperLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * ClassName: AsyncOperLog
 * Description:
 * date: 2021/4/25 11:18
 *
 * @author 须臾
 * @since JDK 1.8
 * 异步日志装填
 */
@Component
public class AsyncOperLog {

    @Autowired
    private OperLogService operLogService;

    @Async
    public void asyncLogExecute(OperLog operLog){
        operLogService.save(operLog);
    }
}
